package cn.ac.iscas;

import com.iscas.datasong.lib.util.DataSongJsonUtils;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.EnvironmentSettings;
import org.apache.flink.table.api.TableEnvironment;
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.socket.config.annotation.EnableWebSocket;

import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.nio.charset.StandardCharsets;

/**
 * @author LJian
 * @version 1.0
 * @description: TODO
 * @date 2022/5/23 13:07
 */
@EnableWebSocket
@EnableScheduling
//@EnableJpaRepositories
@SpringBootApplication
public class FlinkSqlPlatformApplication {
    public static void main(String[] args) {
        SpringApplication.run(FlinkSqlPlatformApplication.class, args);
    }

//    public static void main(String[] args) {
//        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
//        EnvironmentSettings Settings = EnvironmentSettings.newInstance().inStreamingMode().build();
//        StreamTableEnvironment tenv = StreamTableEnvironment.create(env, Settings);
//        tenv.executeSql()
//
////        ByteArrayOutputStream baos = new ByteArrayOutputStream();
////        DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(baos));
////        dos.write();
//        System.out.println("11111111111111111111111111".getBytes(StandardCharsets.UTF_8).length);
//
//    }
}
